package com.vf.cloud.paas.app.master.api.tms.service.impl;

import java.util.Optional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.vf.cloud.paas.app.master.api.tms.service.ITmsTile;
import com.vf.cloud.paas.app.master.common.repository.ITmsTileRepository;
import com.vf.cloud.paas.app.master.common.repository.base.TmsTile;

@Service
public class TmsTileImpl implements ITmsTile{
	
	@Autowired
	private ITmsTileRepository tmsTileRepository;

	@Override
	public TmsTile save(TmsTile entity) {
		return tmsTileRepository.save(entity);
	}

	@Override
	public void deleteById(String id) {
		tmsTileRepository.deleteById(id);
	}

	@Override
	public TmsTile findById(String id) {
		Optional<TmsTile> optional = tmsTileRepository.findById(id);
		if (optional.isPresent())
			return optional.get();
		return null;
	}


}
